package com.hdax.dm.config.web;

import com.hdax.dm.auth.AuthIntercepter;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport {

    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AuthIntercepter())
                .addPathPatterns("/**")
                .order(0);
        super.addInterceptors(registry);
    }
}
